Conversation
Now that we want to fuzz stack switching against a real implementation in V8, add proper validation. Copy in the stack switching tests, commenting out parts we do not handle for other reasons, to test that the new validation logic is correct. Fix DAE2 and a couple of stack switching tests that were not actually valid to begin with.
| // and $ct_handler must be cont [t2_tag*] -> [sig.results] | ||
| // But we cannot check this here because we do not know what type the | ||
| // block named $label expects. Save the tag to check when we visit the | ||
| // block later. |
There was a problem hiding this comment.
I wonder if we could make all this simpler by pre-visiting blocks. But I guess we can consider that separately.
| ;; OPEN_WORLD: (tag $tag (type $none)) | ||
| (tag $tag (type $none)) | ||
| ;; OPEN_WORLD: (tag $tag (type $2) (result i32)) | ||
| (tag $tag (result i32)) |
There was a problem hiding this comment.
Why did this change? I don't see how the result is used below.
There was a problem hiding this comment.
Because $cont above expects to receive an i32 parameter and $cont is created by a resume handler for $tag. Any location that suspends with $tag can only expect to receive back an i32 as the newly created continuation's parameter if $tag has an i32 result.
There was a problem hiding this comment.
Oh, right... $cont does have an i32 here. A similar thing was called $cont-i32 above and I missed the different names meant the same things.
|
lgtm otherwise |
|
I'm going to go through and manually check test coverage before landing because I don't trust the spec tests very far. |
|
Indeed, there is lots of missing coverage. Will go ahead and land this and add more coverage upstream as a follow-up. |
Now that we want to fuzz stack switching against a real implementation in V8, add proper validation. Copy in the stack switching tests, commenting out parts we do not handle for other reasons, to test that the new validation logic is correct. Fix DAE2 and a couple of stack switching tests that were not actually valid to begin with.